
/*
* 引入字体图标
* awesome字体
* 官网 https://fontawesome.dashgame.com/#google_vignette
*/
@import './font-awesome.scss';

@import './animate_scss/hover.scss';

$normal-color: #fff;
$normal-active-color: #409eff;
$primary-color: #409eff;
$primary-active-color: #66b1ff;
$info-color: #909399;
$info-active-color: #a6a9ad;
$success-color: #67c23a;
$success-active-color: #85ce61;
$warning-color: #e6a23c;
$warning-active-color: #ebb563;
$danger-color: #f56c6c;
$danger-active-color: #f78989;
.nb-button {
  display: inline-block;
  position: relative;
  font-family: 'PingFang SC', 'Microsoft Yahei', sans-serif;
  line-height: 1;
  cursor: pointer;
  background-color: $normal-color;
  border: 1px solid #dcdfe6;
  white-space: nowrap;
  color: #606266;
  box-sizing: border-box;
  outline: none;
  transition: 0.1s;
  font-weight: 500;
  // 禁止文字被选中
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  padding: 12px 20px;
  font-size: 14px;
  border-radius: 4px;
  &:hover,
  &:focus {
    color: $normal-active-color;
    border-color: #c6e2ff;
    background-color: #ecf5ff;
  }
}
.nb-button--primary {
  color: #fff;
  background-color: $primary-color;
  border-color: $primary-color;
  //   box-shadow: inset 3px 6px 10px #337ecc, inset -3px -7px 10px #4dbeff;
  &:hover,
  &:focus {
    background: $normal-active-color;
    background-color: $normal-active-color;
    color: #fff;
  }
}
.nb-button--success {
  color: #fff;
  background-color: $success-color;
  border-color: $success-color;
  &:hover,
  &:focus {
    background: $success-active-color;
    background-color: $success-active-color;
    color: #fff;
  }
}
.nb-button--info {
  color: #fff;
  background-color: $info-color;
  border-color: $info-color;
  &:hover,
  &:focus {
    background: $info-active-color;
    background-color: $info-active-color;
    color: #fff;
  }
}
.nb-button--warning {
  color: #fff;
  background-color: $warning-color;
  border-color: $warning-color;
  &:hover,
  &:focus {
    background: $warning-active-color;
    background-color: $warning-active-color;
    color: #fff;
  }
}
.nb-button--danger {
  color: #fff;
  background-color: $danger-color;
  border-color: $danger-color;
  &:hover,
  &:focus {
    background: $danger-active-color;
    background-color: $danger-active-color;
    color: #fff;
  }
}

// 朴素按钮
.nb-button.is-plain {
  box-shadow: unset;
  &:hover,
  &:focus {
    background: #fff;
    border-color: #489eff;
    color: #409eff;
  }
}
.nb-button--primary.is-plain {
  box-shadow: unset;
  color: #409eff;
  background: #ecf5ff;
  &:hover,
  &:focus {
    background: #409eff;
    border-color: #409eff;
    color: #fff;
  }
}
.nb-button--success.is-plain {
  box-shadow: unset;
  color: #67c23a;
  background: #c2e7b0;
  &:hover,
  &:focus {
    background: #67c23a;
    border-color: #67c23a;
    color: #fff;
  }
}
.nb-button--info.is-plain {
  box-shadow: unset;
  color: #909399;
  background: #d3d4d6;
  &:hover,
  &:focus {
    background: #909399;
    border-color: #909399;
    color: #fff;
  }
}
.nb-button--warning.is-plain {
  box-shadow: unset;
  color: #e6a23c;
  background: #f5dab1;
  &:hover,
  &:focus {
    background: #e6a23c;
    border-color: #e6a23c;
    color: #fff;
  }
}
.nb-button--danger.is-plain {
  box-shadow: unset;
  color: #f56c6c;
  background: #fbc4c4;
  &:hover,
  &:focus {
    background: #f56c6c;
    border-color: #f56c6c;
    color: #fff;
  }
}
// round
.nb-button.is-round {
  border-radius: 20px;
  padding: 12px 23px;
}
// 圆形按钮
.nb-button.is-circle {
  border-radius: 50%;
  padding: 12px;
}

// 禁用按钮
.nb-button.is-disabled {
    color: #c0c4cc;
    cursor: not-allowed;
    background-image: none;
    background-color: #fff;
    border-color: #ebeef5;
}
.nb-button--primary.is-disabled {
    color: #fff;
    background-color: #a0cfff;
    border-color: #a0cfff;
}
.nb-button--success.is-disabled {
    color: #fff;
    background-color: #b3e19d;
    border-color: #b3e19d;
}
.nb-button--info.is-disabled {
    color: #fff;
    background-color: #c8c9cc;
    border-color: #c8c9cc;
}
.nb-button--warning.is-disabled {
    color: #fff;
    background-color: #f3d19e;
    border-color: #f3d19e;
}
.nb-button--danger.is-disabled {
    color: #f9a7a7;
    background-color: #fef0f0;
    border-color: #fde2e2;
}

// 禁用按钮
.nb-button.is-plain.is-disabled {
    color: #c0c4cc;
    cursor: not-allowed;
    background-image: none;
    background-color: #fff;
    border-color: #ebeef5;
}
.nb-button--primary.is-plain.is-disabled {
    color: #8cc5ff;
    background-color: #ecf5ff;
    border-color: #d9ecff;
}
.nb-button--success.is-plain.is-disabled {
    color: #a4da89;
    background-color: #f0f9eb;
    border-color: #e1f3d8;
}
.nb-button--info.is-plain.is-disabled {
    color: #bcbec2;
    background-color: #f4f4f5;
    border-color: #e9e9eb;
}
.nb-button--warning.is-plain.is-disabled {
    color: #f0c78a;
    background-color: #fdf6ec;
    border-color: #faecd8;
}
.nb-button--danger.is-plain.is-disabled {
    color: #f9a7a7;
    background-color: #fef0f0;
    border-color: #fde2e2;
}



// 让图标和文字之间空开
.nb-button [class*='nb-icon-'] + span {
  margin-left: 5px;
}
.nb-icon--right{
  margin-left: 10px;
}
.nb-button [class*="nb-icon-"],[class^="nb-icon-"] {
    speak: none;
    font-style: normal;
    font-weight: 400;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    vertical-align: baseline;
    display: inline-block;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
